package lab02.test28;

import java.util.InputMismatchException;
import java.util.Scanner;

/**
 * Created by 星月 on 2017/11/9.
 */
public class Test {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入圆的半径：");
        double radius=scanner.nextDouble();

        try {

               double area = 3.14 * radius * radius;

            System.out.println("圆的面积："+area);
        }catch (InputMismatchException e){
            System.out.println("输入半径类型错误！！");
        }
    }
}
